def get_contexts(request):
    mobile = request.is_mobile
    m_current_page = ''
    current_page = ''
    path = request.path_info.split('/')
    if path[2] == 'm':
        m_current_page = path[3]
    else:
        current_page = path[2]
    return {
            'current_page': current_page,
            'm_current_page': m_current_page,
            'mobile': mobile,
            }
    